﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Common.Library.Db;

namespace Spider.DB
{
    public class MongoDB持久化 : IDBs
    {
        MongoDBHelper db = new MongoDBHelper();

        public MongoDB持久化()
        {

        }

        public void Save<T>(T entity)
        {
            db.AddSignleObject<T>(entity);
        }

        public void SaveList<T>(List<T> list)
        {
            db.AddManyObject<T>(list);
        }
    }
}
